export const swipeCellBehavior = Behavior({
  data:{
    swipeCellQueue: []
  },
  methods: {
    swipeCellOpen(event){
      const instance = this.selectComponent(`#${event.target.id}`)
      this.data.swipeCellQueue.push(instance)
    },
    onSwipeCellPage(){
      //console.log("onSwipeCellPage")
      this.onSwipeCellCommonClick()
    },
    onSwipeClick(){
      //console.log("onSwipeClick")
      this.onSwipeCellCommonClick()
    },
    onSwipeCellCommonClick(){
      this.data.swipeCellQueue.forEach( (instance) =>{
        instance.close()
      })
      this.data.swipeCellQueue = []
    }
  }
})